package transactions.dq.master;

import dinamica.*;

/**
	查询户主姓名是否有重复 by zhangchuan  2010-5-17
*/
public class QueryMasterByName extends dinamica.GenericTransaction
{
    public int service(Recordset inputParams) throws Throwable
    {
        int rc = super.service(inputParams);

        Db db = getDb();

		String master_name = this.getRequest().getParameter("master_name");
		byte[] b = master_name.getBytes("iso-8859-1");

        String query = getResource("query.sql");
        query = getSQL(query, inputParams);

        query = StringUtil.replace(query, "${master_name}", new String(b));
        
        Recordset rs = db.get(query);
        
		publish("isexsit", rs);
        return rc;
        
    }

}
